package io.github.talelin.latticy.service;

import io.github.talelin.latticy.model.RulesDO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author generator@wulongbo
 * @since 2022-08-06
 */
public interface RulesService extends IService<RulesDO> {

    List<RulesDO> getRulesByUserId(int userId);

    List<RulesDO> getAllRules();

    void calculate(String type);

    boolean checkRuleExistByName(String name);

    boolean updateRuleNameById(Integer ruleId, String name);

    boolean updateBaseCostById(Integer ruleId, BigDecimal baseCost);

    boolean deleteRulesByChargeItemId(Integer chargeItemId);

}
